from django.conf.urls.defaults import *
from django.conf import settings

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Example:
    # (r'^pytracking/', include('pytracking.foo.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
		       
    # media (for developmet)
    (r'^media/(?P<path>.*)$', 'django.views.static.serve',
    {'document_root': settings.HERE('tracking/media'), 'show_indexes': True}),

    # Uncomment the next line to enable the admin:
    (r'^admin/(.*)', admin.site.root),
    
    # Store a new location.
    (r'^tracking/device/(?P<imei>[a-z0-9]+)/$', 'pytracking.tracking.views.device.imei_dispatcher'),
    (r'^tracking/device/$', 'pytracking.tracking.views.device.index'),


    # Handle fixed locations.


    # Handle devices
    (r'^tracking/device/new/?', 'pytracking.tracking.views.device.new'),


#    (r'^tracking/location/new',pytracking.tracking.views.location_new),
    (r'^$', 'pytracking.tracking.views.index.index'),
)
